#
# TCSS 422 - Spring 2013
# Paul Ganea, Ralph Feltis, Tarl Hahn
# Team: Something Awesome (We can't remember the exact name)
# 5/2/2013
#

#
# Reports individual statistics about a web crawl.
#
class Stat_Bean():
    def __init__(self,THE_PAGE,KEY_ON_PAGE,TIMER,URL_COUNT,WORD_COUNT):
        self.KEYS = KEY_ON_PAGE
        self.URL = THE_PAGE
        self.time = TIMER
        self.urlcount = URL_COUNT
        self.wordcount= WORD_COUNT
        
    def __str__(self):
        buffer = "Website parsed: " + str(self.URL) + "\n"
        for KEY,VALUE in self.KEYS.iteritems():
            buffer+= "Keyword: " + KEY + " count: " + str(VALUE)+ "\n"
        buffer+="Length to Crawl: " + str(self.time) + "\n URLS Found: " + str(self.urlcount) + "\n TOTAL WORD COUNT: " + str(self.wordcount)
        return buffer
    def __repr__(self):
          return self.URL